package com.example.houduan.exception;

public class BusinessException extends RuntimeException {
    private final Integer code;

    public BusinessException(Integer code, String message) {
        super(message);
        this.code  = code;
    }

    public BusinessException(String message) {
        this(400, message); // 默认400错误码
    }

    public Integer getCode() {
        return code;
    }
}